<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2025/5/26
  Time: 16:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>商品类别修改</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link type="text/css" rel="stylesheet" href="css/index.css">
    <link type="text/css" rel="stylesheet" href="css/base.css">
</head>
<body>

<div class="container">
  <jsp:include page="header.jsp"></jsp:include>

  <div class="main category-edit">
    <h2>修改商品类别</h2>
    <form class="category-edit-form" method="post" action="/admin/category_edit">
<%--        传入商品类别id,隐藏--%>
        <input type="hidden" name="id" value="${param.id}">

        <label for="category-name">类别名称</label>
        <input id="category-name" name="name" value="${param.name}" required><br><br>

        <label>是否启用</label>
        <label for="is_use-yes">是</label>
        <input type="radio" id="is_use-yes" name="is_use" value="true" <c:if test="${param.is_use=='true'}">checked</c:if>>
        <label for="is_use-no">否</label>
        <input type="radio" id="is_use-no" name="is_use" value="false" <c:if test="${param.is_use=='false'}">checked</c:if>>
        <br>
        <button type="submit" class="final-button">保存修改</button>
    </form>
  </div>
</div>

</body>
</html>
